package com.jie.array;

public class Demo02 {
    public static void main(String[] args) {
        //静态初始化：创建+赋值
        int[]a={1,2,3,4,5,6,7,8,9};
        System.out.println(a[8]);


        for (int i = 0; i < a.length ; i++) {
            System.out.println(a[i]);
        }

System.out.println("===============================================");

        //动态初始化：包含默认初始化
        int[] b =new int[10];
        b[2]=2;
        b[3]=6;

        System.out.println(b[2]);
        System.out.println(b[3]);
        System.out.println(b[4]);
        System.out.println(b[5]);

    }
}
